package org.sky.algorithm.linear;

/**
 * Main method
 *
 * @author fog
 * @date 2021/7/28
 */

public class Test {

    public static void main(String[] args) {

        MyStack stack = new MyStack();

        stack.push(3);
        stack.push(5);
        stack.push(9);

        stack.show();
        System.out.println(stack.peek());
        stack.show();

        stack.pop();
        stack.show();

        System.out.println(stack.isEmpty());


        System.out.println("=====================================================");

        MyQueue queue=new MyQueue();

        queue.push(3);
        queue.push(5);
        queue.push(9);

        queue.show();
        System.out.println(queue.peek());
        queue.show();

        queue.poll();
        queue.show();

        System.out.println(queue.isEmpty());

    }

}
